/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-02-19 11:14:47
 * @LastEditTime : 2023-06-27 14:58:23
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Router\MenuNav\ThrRouter\CameraGroupDetail.jsx
 * @Description  :
 */

import { API_LIST } from '../../../Api/Api'
import { commonTableList } from '../Common/common'
import { ProjectList } from '../Common/Conversion'

export const CameraGroupDetail = async ({ twoData, ClientData }) => {
    const { hostname } = window.location
    let dataList = {
        uuid: twoData.uuid,
        isCheckbox: true,
        pageSize: 10,
        params: { pageIndex: 1 },
        get: API_LIST()['getCamera'],
        pos: 'posCameraGroupDetail',
        assemblyData: e => e.map(item => ({ cameraUuid: item.uuid })),
        columns: [
            {
                title: '摄像头编号',
                dataIndex: 'Uuid',
                search: false,
                type: 'hidden',
                hideInTable: true,
            },
            {
                ...commonTableList.projectUuid,
                valueEnum: await ProjectList(),
                hideInAdded: true,
                hideInModify: true,
                hideInTable: true,
                hideInSearch: !hostname.includes('jszx'),
            },
            {
                dataIndex: 'tableName',
                title: '名称',
                valueType: 'input',
                width: 200,
            },
            { ...commonTableList.organizationUuid, valueEnum: ClientData.organization, width: 300 },

            {
                dataIndex: 'cameraPositionName',
                title: '位置',
                valueType: 'input',
                width: 200,
                hideInSearch: true,
            },
            {
                dataIndex: 'cameraTypeName',
                title: '类型',
                valueType: 'input',
                width: 200,
                hideInSearch: true,
            },
        ],
    }

    return dataList
}
